package com.example.computer_exam_training_sys.service;

import com.example.computer_exam_training_sys.dto.LearningProgressDTO;
import com.example.computer_exam_training_sys.vo.LearningProgressVO;
import java.util.List;

public interface UserLearningProgressService {
    /**
     * 自动更新用户所有课程的学习进度
     * 通过user_id关联user_practices和user_exams计算完成率
     * 通过user_id关联user_study_plans更新学习计划进度
     */
    void autoUpdateAllProgress(Long userId);
    
    List<LearningProgressDTO> getCourseProgress(Long userId);
    LearningProgressVO getProgressOverview(Long userId);
    LearningProgressVO getWeakPointsAnalysis(Long userId);
    LearningProgressDTO getCourseLearningProgress(Long userId, Long courseId);
    void updateCourseLearningProgress(Long userId, Long courseId, Double completionRate, Integer studyTime);
    void updateStudyPlanProgress(Long userId, Long courseId);
    Double calculateCourseCompletionRate(Long userId, Long courseId);
}